package com.geek.javase.ch12.videodemo;

import java.io.FileReader;
import java.io.IOException;

/*
 *@author wangpeng
 *2025/10/23 15:57
 *@description TODO
 */
public class FileReaderDemo {
    public static void main(String[] args) {
        try(
                FileReader fr = new FileReader("fileDemo.txt");
        ){
            char[] cs = new char[1024];
            int len = 0;
            while((len = fr.read(cs)) != -1){
                String str = new String(cs, 0, len);
                System.out.println("str+"+str);
            }
        } catch (IOException e){
            e.printStackTrace();
        }
    }
}
